<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    Document   : SurfAds
    Created on : Dec 21, 2008, 1:21:28 PM
    Author     : Geymen
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <script language="JavaScript">

var time = 10000; // 10 secs
var steps = 50; // Five per second
var step = 1;

function progress(url) {
var bar = document.getElementById( "barwrap");
var aStep = (bar.offsetWidth -2) /steps;// 2px border removed from width
var x = Math.round( aStep *step);
var outer = document.getElementById( "outer");
var inner = document.getElementById( "inner");

// Work out seconds based on % progress from current step
var secs = (( time /1000) -Math.floor( ( step /steps) *10));

inner.style.width = x +"px";
step++;

// If 0 seconds, display waiting message instead
outer.firstChild.innerHTML = ( secs? secs +" seconds...": "Advertisement Credited...");
if(secs == 0)
    redirectPage(url);
// Match text
inner.firstChild.innerHTML = outer.firstChild.innerHTML;

if(!(step &gt; steps))
    setTimeout( "progress();", time /steps);
    ////redir();
//else

}

function redir() {
alert( "Redirecting now!");
}

function redirectPage(url)
{
window.location = url;
}
</script>
    <f:view>
        <webuijsf:page id="page1">
            <webuijsf:html id="html1">
                <webuijsf:head id="head1">
                    <webuijsf:link id="link1" url="/resources/stylesheet.css"/>
                </webuijsf:head>
                <webuijsf:body id="body1" style="-rave-layout: grid">
                    <div id="wrap">
                Progress:
                <div id="barwrap"></div>
                        <!-- P wrappers for text positioning -->
                        <div id="outer">
                            <p></p>
                        </div>
                        <!-- original colour/text -->
                        <div id="inner">
                            <p></p>
                        </div>
                        <!-- new colour/text -->
                    </div>
                    <webuijsf:form id="form1">
                        <webuijsf:label id="label1" style="height: 22px; left: 48px; top: 72px; position: absolute; width: 70px" text="Global"/>
                        <webuijsf:hyperlink actionExpression="#{SurfAds.hyperlink1_action}" id="hyperlink1" style="left: 72px; top: 96px; position: absolute" text="Account Summary"/>
                        <webuijsf:hyperlink actionExpression="#{SurfAds.hyperlink2_action}" id="hyperlink2" style="left: 72px; top: 120px; position: absolute" text="Surf Adverts"/>
                        <webuijsf:hyperlink actionExpression="#{SurfAds.hyperlink3_action}" id="hyperlink3" style="left: 72px; top: 144px; position: absolute" text="Buy Adverts"/>
                        <webuijsf:hyperlink actionExpression="#{SurfAds.hyperlink4_action}" id="hyperlink4" style="left: 72px; top: 168px; position: absolute" text="Rent Referrals"/>
                        <webuijsf:label id="label2" style="left: 48px; top: 216px; position: absolute" text="Settings"/>
                        <webuijsf:hyperlink actionExpression="#{SurfAds.hyperlink5_action}" id="hyperlink5" style="left: 72px; top: 240px; position: absolute" text="Personal"/>
                        <webuijsf:hyperlink actionExpression="#{SurfAds.hyperlink6_action}" id="hyperlink6" style="left: 72px; top: 264px; position: absolute" text="Advertisements"/>
                        <webuijsf:label id="label3" style="left: 48px; top: 312px; position: absolute" text="Referrals"/>
                        <webuijsf:hyperlink actionExpression="#{SurfAds.hyperlink7_action}" id="hyperlink7" style="left: 72px; top: 336px; position: absolute" text="Direct"/>
                        <webuijsf:hyperlink actionExpression="#{SurfAds.hyperlink8_action}" id="hyperlink8" style="left: 72px; top: 360px; position: absolute" text="Rented"/>
                        <webuijsf:hyperlink actionExpression="#{SurfAds.hyperlink9_action}" id="hyperlink9" style="left: 72px; top: 408px; position: absolute" text="Cash Out"/>
                        <webuijsf:label id="label4" style="left: 48px; top: 384px; position: absolute" text="Payment"/>
                        <webuijsf:hyperlink actionExpression="#{SurfAds.hyperlink10_action}" id="hyperlink10" style="position: absolute; left: 72px; top: 432px" text="History"/>
                        <webuijsf:staticText binding="#{SurfAds.staticText1}" id="staticText1" style="height: 22px; left: 648px; top: 24px; position: absolute; width: 166px"/>
                        <webuijsf:button actionExpression="#{SurfAds.buttonLogout_action}" id="buttonLogout"
                            style="height: 24px; left: 695px; top: 48px; position: absolute; width: 72px" text="Logout"/>
                        <webuijsf:table augmentTitle="false" id="table1" style="position: absolute; left: 312px; top: 240px" title="Table" width="0">
                            <webuijsf:tableRowGroup id="tableRowGroup1" rows="10" sourceData="#{SurfAds.reklamDataProvider}" sourceVar="currentRow">
                                <webuijsf:tableColumn align="center" headerText="ISIM" id="tableColumn3" sort="REKLAM.ISIM">
                                    <webuijsf:staticText id="staticText4" text="#{currentRow.value['REKLAM.ISIM']}"/>
                                </webuijsf:tableColumn>
                                <webuijsf:tableColumn headerText="URL" id="tableColumn5" sort="REKLAM.URL">
                                    <webuijsf:staticText id="staticText6"
                                        onClick="javascript:window.location= 'ViewAd.jsp?adURL=#{currentRow.value['REKLAM.URL']}'" text="#{currentRow.value['REKLAM.URL']}"/>
                                </webuijsf:tableColumn>
                                <webuijsf:tableColumn headerText="ACIKLAMA" id="tableColumn6" sort="REKLAM.ACIKLAMA">
                                    <webuijsf:staticText id="staticText7" text="#{currentRow.value['REKLAM.ACIKLAMA']}"/>
                                </webuijsf:tableColumn>
                                <webuijsf:tableColumn headerText="TIKSAYISI" id="tableColumn7" sort="REKLAM.TIKSAYISI">
                                    <webuijsf:staticText id="staticText8" text="#{currentRow.value['REKLAM.TIKSAYISI']}"/>
                                </webuijsf:tableColumn>
                                <webuijsf:tableColumn headerText="KALANTIK" id="tableColumn8" sort="REKLAM.KALANTIK">
                                    <webuijsf:staticText id="staticText9" text="#{currentRow.value['REKLAM.KALANTIK']}"/>
                                </webuijsf:tableColumn>
                                <webuijsf:tableColumn headerText="KATEGORI" id="tableColumn10" sort="REKLAM.KATEGORI">
                                    <webuijsf:staticText id="staticText11" text="#{currentRow.value['REKLAM.KATEGORI']}"/>
                                </webuijsf:tableColumn>
                            </webuijsf:tableRowGroup>
                        </webuijsf:table>
                    </webuijsf:form>
                </webuijsf:body>
            </webuijsf:html>
        </webuijsf:page>
    </f:view>
</jsp:root>
